<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<!--
        This program is free software; you can redistribute it and/or modify
        it under the terms of the GNU General Public License as published by
        the Free Software Foundation; either version 2 of the License, or
        (at your option) any later version.
        
        This program is distributed in the hope that it will be useful,
        but WITHOUT ANY WARRANTY; without even the implied warranty of
        MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
        GNU General Public License for more details.
        
        You should have received a copy of the GNU General Public License
        along with this program; if not, write to the Free Software
        Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
        MA 02110-1301, USA.
-->

<html>
	<head>
		<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
		<meta HTTP-EQUIV="Expires" CONTENT="-1">
		<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
		<link type="text/css" href="../../css/jquery-ui/current/jquery-ui.css" rel="stylesheet" />
		<link type="text/css" href="../../css/iframe.css" rel="stylesheet" />
		<script type="text/javascript" src="../../js/jquery.js"></script>
		<script type="text/javascript" src="../../js/jquery-ui.js"></script>
		<script type="text/javascript" src="../../js/jquery.xslt.js"></script>
		<script type="text/javascript" src="../../js/jquery.form.js"></script>
		<script type="text/javascript" src="../../js/iframe.js"></script>
	</head>
	<body style="font-size:12px;">
		<table>
			<tr>
				<td>From:</td>
				<td><input type="text" id="fromdate" /></td>
				<td>To:</td>
				<td><input type="text"id="todate" /></td>
			</tr>
			<tr>
				<td>Dispatch Note:</td>
				<td><input type="text" id="dispatchnote" /></td>
				<td>Serial Number:</td>
				<td><input type="text"id="snumber" /></td>
			</tr>
			<tr>
				<td>Customer:</td>
				<td><div id="customerlist"></div></td>
				<td></td>
				<td></td>
			</tr>
			<tr>
				<td colspan="4" align="right">
					<button type="button" onclick="javascript:printReport();">Print</button>
				</td>
			</tr>
		</table>
		<div id="PDIbPtable"></div>
		
		<script language="javascript">
			function printReport() {
				param = '';
				if ($('#dispatchnote').val() != '') {
					param += "AND `dispatchnote` = '" + $('#dispatchnote').val() + "'"; 
				}
				if ($('#snumber').val() != '') {
					param += " AND `snumber` = '" + $('#snumber').val() + "'"; 
				}
				if ($('#customer').val() != 0) {
					param += " AND `customer` = '" + $('#customer').val() + "'"; 
				}
				update("PDIbPtable", 'fromdate=' + $('#fromdate').val() + '&todate=' + $('#todate').val() + '&param=' + param);
			}
		
			$(function() {
				$("#fromdate").datepicker({ dateFormat: 'dd-mm-yy' });
				$("#todate").datepicker({ dateFormat: 'dd-mm-yy' });
				update('customerlist');
				addSpaceCustomer();
			});
		</script>
	</body>
</html>
